﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for BranchBAL
/// </summary>
public class BranchBAL
{
	 private BranchesDAL _branchDal;

   
    public BranchBAL() : this(new BranchesDAL()) { }
    public BranchBAL(BranchesDAL branchDal) { _branchDal = branchDal; }

    public DataTable AddressFillDropDown()
    {
        

        try
        {

            return _branchDal.AddressFillDropDown();

        }

        catch
        {

            throw;

        }

        finally
        {

            _branchDal = null;

        }

    }
    public int InsertBranch(BranchesBO Branch)
    {

        
        try
        {

            return _branchDal.CreateBranch(Branch);




        }
        catch (Exception ex)
        {
            throw ex;


        }
        finally
        {

            _branchDal = null;

        }
    }
    public int UpdateBranch(BranchesBO Branch)
    {

     
        try
        {

            return _branchDal.UpdateBranch(Branch);

        }

        catch
        {

            throw;

        }

        finally
        {

            _branchDal = null;

        }

    }
    public DataTable BranchesDisplay()
    {

      
        try
        {

            return _branchDal.Load();

        }

        catch
        {

            throw;

        }

        finally
        {

            _branchDal = null;

        }

    }

    public int DeleteBranch(BranchesBO Branch)
    {

       
        try
        {

            return _branchDal.DeleteBranch(Branch);

        }

        catch
        {

            throw;

        }

        finally
        {

            _branchDal = null;

        }

    }
}